<?php
namespace Home\Model;
use Think\Model;
class TribeModel extends Model{ 
	public function get_tribe_list($condition = array(), $limit = 20, $page = 1, $field = "*", $order = "tr_id desc")
    {
        $data = $this->where($condition)->field($field)->limit($limit)->page($page)->order($order)->select();
        foreach ($data as $key => $value) {
        	$create_user = M("User")->field("us_phone")->find($value['tr_create_user']);
        	$data[$key]['tr_create_user_name']=$create_user['us_phone'];
        }
        return $data;
    }

    public function get_count($condition = array()){
        return $this->where($condition)->count();
    }
}
?>